<?php

	// No direct access to this file
	defined('_JEXEC') or die('Restricted access');
	require_once(JPATH_COMPONENT_SITE . '/helpers/LanguageHelper.php');
	$languages = LanguageHelper::getLanguages();
?>
<h1>Select Excel (XLSX) file to import.</h1>
<h2>IMPORTANT NOTE: Excel should contain <?php echo count($languages) . " languages in the following order: ";
		$first = true;
		foreach ($languages as $language) {
			echo (($first) ? '' : ', ') . $language->title;
			$first = false;
		}?></h2>
<form method='POST'
	  action='<?php echo JRoute::_('index.php?option=com_posdatatable&view=import&task=import.submit'); ?>'
	  enctype='multipart/form-data' name="Import">
	<p><input type='file' name='data_file' accept='xls'/></p>

	<p><label>Select year:
			<select name="year" title="Year">
				<option title="Annual" value="0" selected="1">Annual</option>
				<?php
					foreach ($this->getYears() as $year) {
						echo "<option title='$year' value='$year'>$year</option>";
					}
				?>
			</select>
		</label></p>
	<p><input type='submit' value='upload'/></p>
</form><br/>
<p><a href='<?php echo JRoute::_('index.php?option=com_posdatatable&view=import&task=import.reset'); ?>'>Reset
		database</a></p>
<br/>
